
package tankattack.world;

import gamepack.*;
import tankattack.sprites.*;
import java.awt.event.*;
import java.awt.*;
import java.util.Vector;
import java.util.Enumeration;

public class RoomStartUp extends Room {

		static Resource r = ResourceLoader.getResource("tankattack.world.RoomStartUp");

    public RoomStartUp() {
        img = r.img[0][0].img; //roomImg;
		Application.addMouseListener(TankAttackWorld.ml);
		Application.addMouseMotionListener(TankAttackWorld.ml);

		Game.println("Entered roomStartUp()");
		MusicEngine.play( r.music[0] );
    }
    public void exit() {
		Game.println("Exited roomStartUp()");

		Application.removeMouseListener(TankAttackWorld.ml);
		Application.removeMouseMotionListener(TankAttackWorld.ml);
    }

    public void render( Graphics g ) {
 			g.drawImage(img,0,0,null);
			int px = TankAttackWorld.px;
			int py = TankAttackWorld.py;
			int pos = TankAttackWorld.pos;
			int ph = TankAttackWorld.ph;
			Image pointerImg = r.img[0][1].img;
			g.drawImage(pointerImg,px,py+pos*ph,null);		//for(int i=0;i<3;i++) gback.drawRect(r[i].x,r[i].y,r[i].width,r[i].height);
    }
}